﻿namespace CommonDevelop.Operator
{
    /// <summary>
    /// 操作域行为接口（代理模式）
    /// </summary>
    public interface IOperator
    {
        /// <summary>
        /// 设置会话
        /// </summary>
        void SetSession(string key, string value);
        /// <summary>
        /// 获取会话
        /// </summary>
        string GetSession(string key);
        /// <summary>
        /// 清空会话
        /// </summary>
        void SessionClear();

        /// <summary>
        /// 设置cookie（默认8小时）
        /// </summary>
        void SetCookies(string key, string value, int minutes = 8 * 60);
        /// <summary>
        /// 获取cookie
        /// </summary>
        string GetCookies(string key);
        /// <summary>
        /// 删除cookie
        /// </summary>
        void DeleteCookies(string key);
    }
}
